﻿using System;
using System.Collections.Generic;
using System.Text;
using rkShared.BEncode;

namespace rkShared.Serialization
{
    public interface IBinarySerializable
    {
        /// <summary>
        /// Implementors must add all their variables or any other serializatin information as key and value pairs.
        /// </summary>
        /// <param name="dictionary"></param>
        void SerializeToDictionary(BEncodedDictionary dictionary);

        /// <summary>
        /// Implementors must re-populate their serialized variables from Dictionary
        /// </summary>
        /// <param name="dict"></param>
        void DeserializeFromDictionary(BEncodedDictionary dict);
    }
}
